<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Math.round(x) 返回 x 的 取整值（舍入值）</title>
</head>

<body>
    <h1>JavaScript Math.round()</h1>
    <p>Math.round(x) 返回 x 四舍五入到最接近的整数的值：</p>
    <p id="demo"></p>
    <script>
        document.getElementById("demo").innerHTML = Math.round(4.4);
    </script>
</body>

</html>